﻿using System;
using System.Net;
using SCG.SolarVengeanceEngine.StarShips;
using SCG.General;

namespace SCG.SolarVengeanceEngine
{
    //client is notified of new events that happen in the game engine
    public interface ISVHost
    {
        //new starship was created
        void StarShipCreated(StarShip ship);

        //A starship was moved
        void StarShipMoved(StarShip ship, int direction, int engineSpeed);

        //Move a MapObject to an adjacent space
        void ObjectMoved(SVMapObject svm, int x, int y, int engineSpeed);

        //A StarShip was destroyed
        void StarShipDestroyed(StarShip ship);

        //A StarSystem was attacked - called prior to conquest
        void StarSystemAttacked(StarSystem system, Player attacker);

        //A StarShip has traveled via a Wormhole
        void WormholeTraveled(StarShip ship);

        //A StarShip's order was assigned
        void StarShipOrderAssigned(StarShip ship);

        //A StarShip's order was cleared
        void StarShipOrderCleared(StarShip ship);

        //A StarSystem was conquered
        void StarSystemConquered(StarSystem system);

        //A StarShip was damaged
        void StarShipDamaged(StarShip ship);

        //render cloakdetector special effects
        void CloakedShipsDetected(CloakDetector ship);

        //StarShip owner changed
        void StarShipOwnerChanged(StarShip ship);

        //Display a message to the client triggered from a dynamic event
        void DisplayMessage(string message);

        //An object was relocated
        void ObjectRelocated(SVMapObject svm);

        //Create an explosion
        void CreateExplosion(int x, int y, int particles, SCGColor colorStart, SCGColor colorEnd, int diamStart, int diamEnd, int lifeSpan, bool playSound);

        //Terrain has changed!
        void TerrainChanged(int x, int y, char terrain);

        //An object was removed
        void ObjectRemoved(SVMapObject svm);

        //A player was eliminated
        void PlayerEliminated(Player player);

        //A beam attack was made
        void BeamAttack(StarShip ship, StarShip target);

        //send chat from a brain
        void BrainSendChat(Player player, ChatChannel cc, string msg);

        //An alliance was changed
        void AllianceChanged(Player p1, Player p2);

        //A StarSystem was created
        void StarSystemCreated(StarSystem sys);

        //A MapObject was created
        void MapObjectCreated(SVMapObject svm);

        //Pause the action
        void Pause();

        //JumpGate created
        void CreateGate(Wormhole wh);

        //UDO Created
        void UDOCreated(UDO udo);

        //embarked on a carrier
        void StarShipEmbarked(StarShip ship, StarShip carrier);

        //launched from a carrier
        void StarShipLaunched(StarShip ship, StarShip carrier);

        //Zealot converted a StarSystem
        void StarSystemConverted(StarSystem system, Player player);
    }
}
